﻿using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using DR5.SPExtend;

namespace RG.General.Layouts.General
{
    public partial class TestPage : LayoutsPageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SPList list = Web.Lists["ABC"];
            SPListItem li = list.GetListItem("Title", "Title 1", true);

            string str = li["Field 1"].ToStr();

            li.AddValue("Date", new DateTime())
                .AddValue("Integer Col", 123)
                .AddValue("TrueOrFalse", true)
                .AddValue("AnyObject", new object())
                .AddTaxonomyEmpty("Tax1")
                .AddTaxonomyValue("Tax2", new Microsoft.SharePoint.Taxonomy.TaxonomyFieldValue("SOME VALUE"))
                .Update();
        }
    }
}
